﻿#region Using Directives

    using System;

    using Csla;

#endregion

namespace MarketPulse.BusinessLogic.Common.Criteria
{
    /// <summary>
    /// Criteria class specifying the GUID of a company to use as search criteria 
    /// </summary>
    [Serializable]
    public class CompanyGUIDCriteria : CriteriaBase<CompanyGUIDCriteria>
    {

        #region Constructors

        /// <summary>
        /// Default constructor for this class
        /// </summary>
        /// <param name="companyGuid">The Guid of the Company to associate with this criteria</param>                      
        public CompanyGUIDCriteria(Guid companyGuid)
        {
            CompanyGUID = companyGuid;
        }

        #endregion

        #region Properties

        /// <summary>
        /// This Guid is used to identify the Company object associated with this criteria
        /// </summary>
        public static PropertyInfo<Guid?> CompanyGUIDProperty = RegisterProperty<Guid?>(p => p.CompanyGUID);
        /// <summary>
        /// This Guid is used to identify the Company object associated with this criteria
        /// </summary>
        public Guid? CompanyGUID
        {
            get { return ReadProperty(CompanyGUIDProperty); }
            private set { LoadProperty(CompanyGUIDProperty, value); }
        }

        #endregion

    }
}
